// CoalMineUnit.cpp: implementation of the CoalMineUnit class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "kwclientcore.h"
#include "CoalMineUnit.h"
#include "MainPanel.h"
#include "Client.h"

#include "CommonLib\RecordManager.h"

#include "MonitoringUnitLib\BaseMonitoringUnit.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

CoalMineUnit::CoalMineUnit(CoalMineUnitManager * pMgr):
BaseCoalMineUnit(pMgr)
{

}

CoalMineUnit::~CoalMineUnit()
{

}

void CoalMineUnit::DoDisplay(BaseMonitoringUnit * pMonitoringUnit) const
{
  if (g_pMainPanel)
  {
    RealtimeRecordManager * pRealtimeRecordMgr = Client::Instance()->GetRealtimeRecordManagerById(GetId(), pMonitoringUnit->GetId());
    if (pRealtimeRecordMgr)
    {
      Client::Instance()->AppendRealtimeRecord(pRealtimeRecordMgr, pMonitoringUnit);
    }
    g_pMainPanel->UpdateDataDisplay((BaseCoalMineUnit *)this, pMonitoringUnit);
  }
}
